/*function and how to call the function*/
/*In this eg we will try to make a calculator by C*/
#include<stdio.h>
main(){
       int i;
       int a,b,r;
       printf("Input a number:");
       scanf("%d",&a);
       printf("\n1.multi it");
       printf("\n2.divide it");
       printf("\n3.Plus it");
       printf("\n4.Minus it");
       printf("\n0.Exit");
       //printf("\nEnter the number to choose operator:");
       //scanf("%d",&i);
       if (!i) return;
       printf("\nInput another number");
       scanf("%d",&b);
       choose:switch(i){
                 //case 0:
                 //    return;
                  //   break;
                     
                 case 1:
                      r=multi(a,b);
                      break;
                case 2:
                      r=divide(a,b);
                      break;
                 case 3:
                      r=plus(a,b);
                      break;
                 case 4:
                      r=minus(a,b);
                      break;
                 case 0:
                      return;
                      break;
                 default:
                 printf("\nEnter the number to choose the operator");
                 scanf("%d",&i);
                 goto choose;
                 break;}
       printf("The result is %d",r);
      getch();
      }
multi(int mk, int mt)
{
             int mj;
             mj=mk*mt;
             return  mj;
}
             
divide(int dk, int dt){
              return (dk/dt);}
plus( int pk, int pt){
          int pj;
          pj=pk+pt;
          return pj;
          }
minus(int mik,int mit){
             int mij;
             mij=mik-mit;
             return mij;}
